﻿using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using GarageManagement.Models;

namespace GarageManagement.DataAccess
{
    public class GarageManagementContext : DbContext
    {
        public DbSet<Customer> Customers { get; set; }
        public DbSet<CustomerType> CustomerTypes { get; set; }
        public DbSet<Manufacturer> Manufacturers { get; set; }
        public DbSet<Vehicle> Vehicles { get; set; } 

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
            base.OnModelCreating(modelBuilder);
        }
    }
}
